Skip to content

Hoist PerformanceLogger primitives out of react-native (#56580)#56580

Closed
rubennorte wants to merge 1 commit into
react:mainfrom
rubennorte:export-D102166537
Closed

Hoist PerformanceLogger primitives out of react-native (#56580)#56580
rubennorte wants to merge 1 commit into
react:mainfrom
rubennorte:export-D102166537

Conversation

@rubennorte

@rubennorte rubennorte commented Apr 23, 2026

Copy link
Copy Markdown
Contributor

Summary:

Changelog: [General][Deprecated] Deprecated second argument for hook function passed to AppRegistry.setComponentProviderInstrumentationHook as it's not usable by apps. Passed stub that warns when used.

Context

The performance-logger primitives (createPerformanceLogger, GlobalPerformanceLogger, PerformanceLoggerContext, the IPerformanceLogger implementation) and the telemetry they emitted have always been internal — they were never part of the OSS package's public API. Keeping them inside react-native is dead weight for external consumers and forces every change to that surface to land through OSS sync.

Changes

Removes the perf-logger source files and their telemetry emission from react-native. The IPerformanceLogger interface (the only consumer-visible artifact) stays as a public type in its own Libraries/ReactNative/IPerformanceLogger.{flow.js,d.ts} file.

Public API surface kept stable:

  • XMLHttpRequest.setPerformanceLogger(...) is preserved, typed against a thin local XHRPerformanceLogger interface (just startTimespan / stopTimespan). Defaults to null; emits no network_XMLHttpRequest_<friendlyName> timespan when no logger is set.
  • AppRegistry.setComponentProviderInstrumentationHook(...) keeps its 2-arg signature, and the 'GlobalPerformanceLogger' callable native module is still registered. Both now point at a shared no-op IPerformanceLogger stub that emits a one-time console.warn flagging deprecation.
  • Libraries/Core/InitializeCore.js is stripped of the initializeCore_* markPoints; everything else (the call into setUpDefaultReactNativeEnvironment) is unchanged.

Impact

Non-breaking for OSS consumers — nothing that was importable from react-native becomes unavailable. Embedders that were consuming the internal telemetry through their own integration can re-emit it at the call site that registers the surface.

Reviewed By: javache

Differential Revision: D102166537

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Apr 23, 2026
@meta-codesync

meta-codesync Bot commented Apr 23, 2026

Copy link
Copy Markdown

@rubennorte has exported this pull request. If you are a Meta employee, you can view the originating Diff in D102166537.

@meta-codesync meta-codesync Bot changed the title Hoist PerformanceLogger primitives out of react-native Hoist PerformanceLogger primitives out of react-native (#56580) Apr 23, 2026
rubennorte added a commit to rubennorte/react-native that referenced this pull request Apr 23, 2026
Summary:
Pull Request resolved: react#56580

Changelog: [General][Deprecated] Deprecated second argument for hook function passed to `AppRegistry.setComponentProviderInstrumentationHook` as it's not usable by apps. Passed stub that warns when used.

## Context

The performance-logger primitives (`createPerformanceLogger`, `GlobalPerformanceLogger`, `PerformanceLoggerContext`, the `IPerformanceLogger` implementation) and the telemetry they emitted have always been internal — they were never part of the OSS package's public API. Keeping them inside `react-native` is dead weight for external consumers and forces every change to that surface to land through OSS sync.

## Changes

Removes the perf-logger source files and their telemetry emission from `react-native`. The `IPerformanceLogger` interface (the only consumer-visible artifact) is kept in its own `Libraries/ReactNative/IPerformanceLogger.{flow.js,d.ts}` file so embedders can still type their own implementations against it.

Public API surface kept stable:
- `XMLHttpRequest.setPerformanceLogger(...)` is preserved, typed against a thin local `XHRPerformanceLogger` interface (just `startTimespan` / `stopTimespan`). Defaults to `null`; emits no `network_XMLHttpRequest_<friendlyName>` timespan when no logger is set.
- `AppRegistry.setComponentProviderInstrumentationHook(...)` is preserved with its 2-arg signature. The second argument is now a no-op `IPerformanceLogger` stub that emits a one-time `console.warn` flagging it as deprecated — embedders should provide their own per-app context if they need it.

## Impact

Non-breaking for OSS consumers — nothing that was importable from `react-native` becomes unavailable. Telemetry that the package used to emit (`renderApplication_React_render`, `usedReactConcurrentRoot/Fabric/Profiler` extras, `initializeCore_*` markers, the `'GlobalPerformanceLogger'` callable native module) was never wired to anything in the OSS package; embedders that were consuming those signals through their own integration can re-emit them at the call site that registers the surface.

Differential Revision: D102166537
rubennorte added a commit to rubennorte/react-native that referenced this pull request Apr 23, 2026
Summary:
Pull Request resolved: react#56580

Changelog: [General][Deprecated] Deprecated second argument for hook function passed to `AppRegistry.setComponentProviderInstrumentationHook` as it's not usable by apps. Passed stub that warns when used.

## Context

The performance-logger primitives (`createPerformanceLogger`, `GlobalPerformanceLogger`, `PerformanceLoggerContext`, the `IPerformanceLogger` implementation) and the telemetry they emitted have always been internal — they were never part of the OSS package's public API. Keeping them inside `react-native` is dead weight for external consumers and forces every change to that surface to land through OSS sync.

## Changes

Removes the perf-logger source files and their telemetry emission from `react-native`. The `IPerformanceLogger` interface (the only consumer-visible artifact) is kept in its own `Libraries/ReactNative/IPerformanceLogger.{flow.js,d.ts}` file so embedders can still type their own implementations against it.

Public API surface kept stable:
- `XMLHttpRequest.setPerformanceLogger(...)` is preserved, typed against a thin local `XHRPerformanceLogger` interface (just `startTimespan` / `stopTimespan`). Defaults to `null`; emits no `network_XMLHttpRequest_<friendlyName>` timespan when no logger is set.
- `AppRegistry.setComponentProviderInstrumentationHook(...)` is preserved with its 2-arg signature. The second argument is now a no-op `IPerformanceLogger` stub that emits a one-time `console.warn` flagging it as deprecated — embedders should provide their own per-app context if they need it.

## Impact

Non-breaking for OSS consumers — nothing that was importable from `react-native` becomes unavailable. Telemetry that the package used to emit (`renderApplication_React_render`, `usedReactConcurrentRoot/Fabric/Profiler` extras, `initializeCore_*` markers, the `'GlobalPerformanceLogger'` callable native module) was never wired to anything in the OSS package; embedders that were consuming those signals through their own integration can re-emit them at the call site that registers the surface.

Differential Revision: D102166537
@rubennorte rubennorte force-pushed the export-D102166537 branch 2 times, most recently from 787e771 to 214d841 Compare April 23, 2026 17:38
rubennorte added a commit to rubennorte/react-native that referenced this pull request Apr 23, 2026
Summary:
Pull Request resolved: react#56580

Changelog: [General][Deprecated] Deprecated second argument for hook function passed to `AppRegistry.setComponentProviderInstrumentationHook` as it's not usable by apps. Passed stub that warns when used.

## Context

The performance-logger primitives (`createPerformanceLogger`, `GlobalPerformanceLogger`, `PerformanceLoggerContext`, the `IPerformanceLogger` implementation) and the telemetry they emitted have always been internal — they were never part of the OSS package's public API. Keeping them inside `react-native` is dead weight for external consumers and forces every change to that surface to land through OSS sync.

## Changes

Removes the perf-logger source files and their telemetry emission from `react-native`. The `IPerformanceLogger` interface (the only consumer-visible artifact) is kept in its own `Libraries/ReactNative/IPerformanceLogger.{flow.js,d.ts}` file so embedders can still type their own implementations against it.

Public API surface kept stable:
- `XMLHttpRequest.setPerformanceLogger(...)` is preserved, typed against a thin local `XHRPerformanceLogger` interface (just `startTimespan` / `stopTimespan`). Defaults to `null`; emits no `network_XMLHttpRequest_<friendlyName>` timespan when no logger is set.
- `AppRegistry.setComponentProviderInstrumentationHook(...)` is preserved with its 2-arg signature. The second argument is now a no-op `IPerformanceLogger` stub that emits a one-time `console.warn` flagging it as deprecated — embedders should provide their own per-app context if they need it.

## Impact

Non-breaking for OSS consumers — nothing that was importable from `react-native` becomes unavailable. Telemetry that the package used to emit (`renderApplication_React_render`, `usedReactConcurrentRoot/Fabric/Profiler` extras, `initializeCore_*` markers, the `'GlobalPerformanceLogger'` callable native module) was never wired to anything in the OSS package; embedders that were consuming those signals through their own integration can re-emit them at the call site that registers the surface.

Differential Revision: D102166537
rubennorte added a commit to rubennorte/react-native that referenced this pull request Apr 23, 2026
Summary:
Pull Request resolved: react#56580

Changelog: [General][Deprecated] Deprecated second argument for hook function passed to `AppRegistry.setComponentProviderInstrumentationHook` as it's not usable by apps. Passed stub that warns when used.

## Context

The performance-logger primitives (`createPerformanceLogger`, `GlobalPerformanceLogger`, `PerformanceLoggerContext`, the `IPerformanceLogger` implementation) and the telemetry they emitted have always been internal — they were never part of the OSS package's public API. Keeping them inside `react-native` is dead weight for external consumers and forces every change to that surface to land through OSS sync.

## Changes

Removes the perf-logger source files and their telemetry emission from `react-native`. The `IPerformanceLogger` interface (the only consumer-visible artifact) is kept in its own `Libraries/ReactNative/IPerformanceLogger.{flow.js,d.ts}` file so embedders can still type their own implementations against it.

Public API surface kept stable:
- `XMLHttpRequest.setPerformanceLogger(...)` is preserved, typed against a thin local `XHRPerformanceLogger` interface (just `startTimespan` / `stopTimespan`). Defaults to `null`; emits no `network_XMLHttpRequest_<friendlyName>` timespan when no logger is set.
- `AppRegistry.setComponentProviderInstrumentationHook(...)` is preserved with its 2-arg signature. The second argument is now a no-op `IPerformanceLogger` stub that emits a one-time `console.warn` flagging it as deprecated — embedders should provide their own per-app context if they need it.

## Impact

Non-breaking for OSS consumers — nothing that was importable from `react-native` becomes unavailable. Telemetry that the package used to emit (`renderApplication_React_render`, `usedReactConcurrentRoot/Fabric/Profiler` extras, `initializeCore_*` markers, the `'GlobalPerformanceLogger'` callable native module) was never wired to anything in the OSS package; embedders that were consuming those signals through their own integration can re-emit them at the call site that registers the surface.

Differential Revision: D102166537
rubennorte added a commit to rubennorte/react-native that referenced this pull request Apr 24, 2026
Summary:
Pull Request resolved: react#56580

Changelog: [General][Deprecated] Deprecated second argument for hook function passed to `AppRegistry.setComponentProviderInstrumentationHook` as it's not usable by apps. Passed stub that warns when used.

## Context

The performance-logger primitives (`createPerformanceLogger`, `GlobalPerformanceLogger`, `PerformanceLoggerContext`, the `IPerformanceLogger` implementation) and the telemetry they emitted have always been internal — they were never part of the OSS package's public API. Keeping them inside `react-native` is dead weight for external consumers and forces every change to that surface to land through OSS sync.

## Changes

Removes the perf-logger source files and their telemetry emission from `react-native`. The `IPerformanceLogger` interface (the only consumer-visible artifact) stays as a public type in its own `Libraries/ReactNative/IPerformanceLogger.{flow.js,d.ts}` file.

Public API surface kept stable:
- `XMLHttpRequest.setPerformanceLogger(...)` is preserved, typed against a thin local `XHRPerformanceLogger` interface (just `startTimespan` / `stopTimespan`). Defaults to `null`; emits no `network_XMLHttpRequest_<friendlyName>` timespan when no logger is set.
- `AppRegistry.setComponentProviderInstrumentationHook(...)` keeps its 2-arg signature, and the `'GlobalPerformanceLogger'` callable native module is still registered. Both now point at a shared no-op `IPerformanceLogger` stub that emits a one-time `console.warn` flagging deprecation.
- `Libraries/Core/InitializeCore.js` is stripped of the `initializeCore_*` markPoints; everything else (the call into `setUpDefaultReactNativeEnvironment`) is unchanged.

## Impact

Non-breaking for OSS consumers — nothing that was importable from `react-native` becomes unavailable. Embedders that were consuming the internal telemetry through their own integration can re-emit it at the call site that registers the surface.

Reviewed By: javache

Differential Revision: D102166537
rubennorte added a commit to rubennorte/react-native that referenced this pull request Apr 24, 2026
Summary:
Pull Request resolved: react#56580

Changelog: [General][Deprecated] Deprecated second argument for hook function passed to `AppRegistry.setComponentProviderInstrumentationHook` as it's not usable by apps. Passed stub that warns when used.

## Context

The performance-logger primitives (`createPerformanceLogger`, `GlobalPerformanceLogger`, `PerformanceLoggerContext`, the `IPerformanceLogger` implementation) and the telemetry they emitted have always been internal — they were never part of the OSS package's public API. Keeping them inside `react-native` is dead weight for external consumers and forces every change to that surface to land through OSS sync.

## Changes

Removes the perf-logger source files and their telemetry emission from `react-native`. The `IPerformanceLogger` interface (the only consumer-visible artifact) stays as a public type in its own `Libraries/ReactNative/IPerformanceLogger.{flow.js,d.ts}` file.

Public API surface kept stable:
- `XMLHttpRequest.setPerformanceLogger(...)` is preserved, typed against a thin local `XHRPerformanceLogger` interface (just `startTimespan` / `stopTimespan`). Defaults to `null`; emits no `network_XMLHttpRequest_<friendlyName>` timespan when no logger is set.
- `AppRegistry.setComponentProviderInstrumentationHook(...)` keeps its 2-arg signature, and the `'GlobalPerformanceLogger'` callable native module is still registered. Both now point at a shared no-op `IPerformanceLogger` stub that emits a one-time `console.warn` flagging deprecation.
- `Libraries/Core/InitializeCore.js` is stripped of the `initializeCore_*` markPoints; everything else (the call into `setUpDefaultReactNativeEnvironment`) is unchanged.

## Impact

Non-breaking for OSS consumers — nothing that was importable from `react-native` becomes unavailable. Embedders that were consuming the internal telemetry through their own integration can re-emit it at the call site that registers the surface.

Reviewed By: javache

Differential Revision: D102166537
@rubennorte rubennorte force-pushed the export-D102166537 branch 2 times, most recently from b32076f to aef94b9 Compare April 24, 2026 11:57
rubennorte added a commit to rubennorte/react-native that referenced this pull request Apr 24, 2026
Summary:
Pull Request resolved: react#56580

Changelog: [General][Deprecated] Deprecated second argument for hook function passed to `AppRegistry.setComponentProviderInstrumentationHook` as it's not usable by apps. Passed stub that warns when used.

## Context

The performance-logger primitives (`createPerformanceLogger`, `GlobalPerformanceLogger`, `PerformanceLoggerContext`, the `IPerformanceLogger` implementation) and the telemetry they emitted have always been internal — they were never part of the OSS package's public API. Keeping them inside `react-native` is dead weight for external consumers and forces every change to that surface to land through OSS sync.

## Changes

Removes the perf-logger source files and their telemetry emission from `react-native`. The `IPerformanceLogger` interface (the only consumer-visible artifact) stays as a public type in its own `Libraries/ReactNative/IPerformanceLogger.{flow.js,d.ts}` file.

Public API surface kept stable:
- `XMLHttpRequest.setPerformanceLogger(...)` is preserved, typed against a thin local `XHRPerformanceLogger` interface (just `startTimespan` / `stopTimespan`). Defaults to `null`; emits no `network_XMLHttpRequest_<friendlyName>` timespan when no logger is set.
- `AppRegistry.setComponentProviderInstrumentationHook(...)` keeps its 2-arg signature, and the `'GlobalPerformanceLogger'` callable native module is still registered. Both now point at a shared no-op `IPerformanceLogger` stub that emits a one-time `console.warn` flagging deprecation.
- `Libraries/Core/InitializeCore.js` is stripped of the `initializeCore_*` markPoints; everything else (the call into `setUpDefaultReactNativeEnvironment`) is unchanged.

## Impact

Non-breaking for OSS consumers — nothing that was importable from `react-native` becomes unavailable. Embedders that were consuming the internal telemetry through their own integration can re-emit it at the call site that registers the surface.

Reviewed By: javache

Differential Revision: D102166537
Summary:
Pull Request resolved: react#56580

Changelog: [General][Deprecated] Deprecated second argument for hook function passed to `AppRegistry.setComponentProviderInstrumentationHook` as it's not usable by apps. Passed stub that warns when used.

## Context

The performance-logger primitives (`createPerformanceLogger`, `GlobalPerformanceLogger`, `PerformanceLoggerContext`, the `IPerformanceLogger` implementation) and the telemetry they emitted have always been internal — they were never part of the OSS package's public API. Keeping them inside `react-native` is dead weight for external consumers and forces every change to that surface to land through OSS sync.

## Changes

Removes the perf-logger source files and their telemetry emission from `react-native`. The `IPerformanceLogger` interface (the only consumer-visible artifact) stays as a public type in its own `Libraries/ReactNative/IPerformanceLogger.{flow.js,d.ts}` file.

Public API surface kept stable:
- `XMLHttpRequest.setPerformanceLogger(...)` is preserved, typed against a thin local `XHRPerformanceLogger` interface (just `startTimespan` / `stopTimespan`). Defaults to `null`; emits no `network_XMLHttpRequest_<friendlyName>` timespan when no logger is set.
- `AppRegistry.setComponentProviderInstrumentationHook(...)` keeps its 2-arg signature, and the `'GlobalPerformanceLogger'` callable native module is still registered. Both now point at a shared no-op `IPerformanceLogger` stub that emits a one-time `console.warn` flagging deprecation.
- `Libraries/Core/InitializeCore.js` is stripped of the `initializeCore_*` markPoints; everything else (the call into `setUpDefaultReactNativeEnvironment`) is unchanged.

## Impact

Non-breaking for OSS consumers — nothing that was importable from `react-native` becomes unavailable. Embedders that were consuming the internal telemetry through their own integration can re-emit it at the call site that registers the surface.

Reviewed By: javache

Differential Revision: D102166537
@react-native-bot

Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @rubennorte in 6411611

When will my fix make it into a release? | How to file a pick request?

@facebook-github-tools facebook-github-tools Bot added the Merged This PR has been merged. label Apr 24, 2026
@meta-codesync

meta-codesync Bot commented Apr 24, 2026

Copy link
Copy Markdown

This pull request has been merged in 6411611.

@facebook-github-tools

Copy link
Copy Markdown

This pull request has been reverted by a5d7ab1.

meta-codesync Bot pushed a commit that referenced this pull request Apr 27, 2026
…s out of `react-native`" (#56621)

Summary:
Pull Request resolved: #56621

Changelog: [General][Deprecated] Deprecated second argument for hook function passed to AppRegistry.setComponentProviderInstrumentationHook as it's not usable by apps. Passed stub that warns when used.

Re-applying #56580 that was reverted.

Reviewed By: javache

Differential Revision: D102593753

fbshipit-source-id: 7714260a494a62d55880f10887cd440d217a4672
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged This PR has been merged. meta-exported p: Facebook Partner: Facebook Partner Reverted

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants